package com.novoda.runbuddy.view.calendar;

import java.util.Map;

import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.widget.Button;

public class MonthContextButton extends Button {

	@Override
	protected void onDraw(Canvas canvas) {
		super.onDraw(canvas);
	}

	@Override
	protected int[] onCreateDrawableState(int extraSpace) {
		return super.onCreateDrawableState(extraSpace);
	}

	@Override
	protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
		super.onLayout(changed, left, top, right, bottom);
	}

	@Override
	protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
		super.onMeasure(widthMeasureSpec, heightMeasureSpec);
		setMeasuredDimension(Math.max(100, getMeasuredWidth()), getMeasuredHeight());
	}

	protected boolean	isChecked	= false;

	public MonthContextButton(Context context) {
		super(context);
	}

	public MonthContextButton(Context context, AttributeSet attrs, Map<?, ?> params) {
		super(context, attrs);
	}

	public boolean isChecked() {
		return this.isChecked;
	}

	@Override
	public boolean performClick() {
		this.isChecked = !this.isChecked;
		return super.performClick();
	}

}
